4D Chart v13

CT AREA TO FIELD

Home

 
4D Chart v13
CT AREA TO FIELD

CT AREA TO FIELD 


 

CT AREA TO FIELD ( area ; scope ; numTable ; numField ; saveOption ) 
Parameter Type   Description
area  Longint in 4D Chart area
scope  Longint in Scope of the command -2 = Document -1 = All 0 = Selected objects >0 = Object ID
numTable  Integer in Table number
numField  Integer in Field number
saveOption  Integer in Method of saving the contents of area 1 = Picture only 2 = Data only 3 = Picture and data -1 = No change

The CT AREA TO FIELD command copies the contents of area into the BLOB or Picture field specified by table and field.

CT AREA TO FIELD is useful when you want to store objects in a field of a related table or store only specific objects. CT AREA TO FIELD simply assigns the objects to field. The record in table must still be saved.

scope controls what is copied.

The optional saveOption parameter determines how the document in the 4D Chart area is saved.

  • If saveOption equals 1, only the picture (PICT) is saved. Objects can no longer be manipulated individually.
  • If saveOption equals 2, only the data concerning the objects in the 4D Chart area is saved. The image is later rebuilt using the information in the saved data. This save option is the quickest and uses the least amount of memory. If there is not enough memory for the save option chosen, a dialog box that allows you to choose another option appears.
  • If saveOption equals 3, both the picture and the internal data used to rebuild the image are saved. This is the normal way to save a document.

Example  

This example creates a related record for an object in area.

  `Create a record to store the object
 CREATE RECORD([Objects])
  `Assign the relating value
 [Objects]Key:=[Charts]Name
  `Get the object’s ID
 $Temp:=CT Get ID(Area;-1;3)
  `Copy the object into the record
 CT AREA TO FIELD(Area;$Temp;3;2;1)
  `Save the record
 SAVE RECORD([Objects])

 
PROPERTIES 

Product: 4D Chart
Theme: CT Area
Number: 14507

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Chart 1

 
SEE ALSO 

CT FIELD TO AREA